﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="User_index.aspx.cs" Inherits="newBlog.User.User_index" %>
<%@ Import Namespace="newBlog.CenterInc.Ctrltor" %>
<%@ Import Namespace="newBlog.CenterInc.model"  %>
<%@ Register Src="~/model/allLink.ascx" TagPrefix="uc1" TagName="allLink" %>
<%@ Register Src="~/User/User_msg.ascx" TagPrefix="uc1" TagName="User_msg" %>
<%@ Register Src="~/User/User_safe.ascx" TagPrefix="uc1" TagName="User_safe" %>
<%@ Register Src="~/User/User_Recharge.ascx" TagPrefix="uc1" TagName="User_Recharge" %>

<%--<%=//list[0].Level > 1000 ? "王者" : list[0].Level > 800 ? "钻石" : list[0].Level > 500 ? "黄金" : list[0].Level > 300 ? "白银" : list[0].Level > 100 ? "青铜" : "普通" %>--%>

<%       if (Session["user_id"]==null) {
        Response.Redirect("/index.aspx");
    }
    string action = Request.QueryString["action"];
    User_inc user_Inc = new User_inc();
    string user_id = Session["user_id"].ToString();
    User_msgDao user_MsgDao = user_Inc.User_msg(user_id);
    %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>用户中心-<%=Application["title"] %></title>
    <meta name="description" content="<%=Application["content"] %>">
    <meta name="keywords" content="<%=Application["key"] %>">
    <uc1:allLink runat="server" ID="allLink" />
    <link rel="stylesheet" href="/css/user/style.css?<%=DateTime.Now.ToString("yyyyMMddHHmmssffff") %>">
    <script src="/js/user/user_index.js"></script>
</head>
<body>
    <div class="layui-row layui-col-space5 margin0">
    <div class="layui-col-md3">
    <div class="layui-panel">
                        <div class="layui-row">
                            <div class="layui-col-md4 layui-col-xs4">
                                <img src="<%=user_MsgDao.Img %>" class="layui-circle border elemXcenter" width="70px" height="70px" style="opacity: 0.4">
                                <div style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);color: #acacac;font-weight: bold;font-size: 30px"><i class="layui-icon layui-icon-camera"></i></div>
                                <button id="ImgUP"></button>
                                <script>
                                RenderUpload('#ImgUP','/CenterInc/view_inc/upload.aspx?mode=2',done_upload(),'','images','1024*2','image/jpg, image/png','',true,'updata_portrait',false,1);
</script>
                            </div>
                            <!--作者头像-->
                            <div class="layui-col-md4 layui-col-xs4">
                                <div style="position: relative; margin-top: 25px">
                                    <h2><%=Session["user_name"] %></h2>
                                    等级：<span class="layui-badge layui-bg-gray">
                                        <%=Convert.ToInt32(user_MsgDao.Level) > 1000 ? "王者" : Convert.ToInt32(user_MsgDao.Level) > 800 ? "钻石" : Convert.ToInt32(user_MsgDao.Level) > 500 ? "黄金" : Convert.ToInt32(user_MsgDao.Level) > 300 ? "白银" : Convert.ToInt32(user_MsgDao.Level) > 100 ? "青铜" : "普通" %>
                                       </span>
                                </div>
                            </div>
                            <!--用户名等级-->
                        </div>
                        <hr>
                        <div class="layui-row layui-col-space10 text-style">
                            <div class="layui-col-md3 layui-col-xs3">文章</div>
                            <div class="layui-col-md3 layui-col-xs3">关注</div>
                            <div class="layui-col-md3 layui-col-xs3">粉丝</div>
                            <div class="layui-col-md3 layui-col-xs3">评论</div>
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.Article_count %></div>
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.Follow_count %></div>
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.Fans_count %></div>
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.Comment_count1 %></div>
                            <div class="layui-col-md3 layui-col-xs3">余额</div>
                            <div class="layui-col-md3 layui-col-xs3">消费</div>
                            <div class="layui-col-md3 layui-col-xs3">权限</div>
                            <div class="layui-row layui-col-space10">
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.Balance %></div>
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.ShopCount1 %></div>
                            <div class="layui-col-md3 layui-col-xs3"><%=user_MsgDao.Grade %></div>
                            </div>
                        </div>
                        <!--用户信息-->
                        <hr>
                        <div class="layui-row">

                            <div class="layui-clear">
                            <div class="layui-col-md2 layui-col-xs2"><label class="text-left">系统：</label></div>
                            <div class="layui-col-md10 layui-col-xs10"><lable id="User_os" class="User-Item-msg"><%=Request.Browser.Platform %></lable></div>
                            <div class="layui-col-md2 layui-col-xs2"><label class="text-left">浏览器：</label></div>
                            <div class="layui-col-md10 layui-col-xs10"><lable id="User_os" class="User-Item-msg"><%=Request.Browser.Browser %></lable></div>
                            <div class="layui-col-md2 layui-col-xs2"><label class="text-left">版本：</label></div>
                            <div class="layui-col-md10 layui-col-xs10"><lable id="User_os" class="User-Item-msg"><%=Request.Browser.Version %></lable></div>
                            <div class="layui-col-md2 layui-col-xs2"><label class="text-left">移动端：</label></div>
                            <div class="layui-col-md10 layui-col-xs10"><lable id="User_os" class="User-Item-msg"><%=Request.Browser.IsMobileDevice %></lable></div>
                            </div>
                        <script>
                        var device = layui.device();
                        </script>
                        </div>
                        <!--用户浏览器基本信息-->
                    </div>
    </div><!--侧边栏-->
    <div class="layui-col-md9">
       <div class="layui-panel widthMax">
           <%
               switch(action){
                   case "safe":
                       %>
           <uc1:User_safe runat="server" id="User_safe" />
           <%
                       break;
                   case "Recharge":
                       %>
           <uc1:User_Recharge runat="server" id="User_Recharge" />
           <%
                       break;
                   default:
                       %>
           <uc1:User_msg runat="server" id="User_msg" />
           <%
                       break;
               }
               %>
     
    </div>
    </div><!--主体页面-->
    </div><!--整体布局-->
</body>
</html>
